<?php 
	session_start();
	require("connect.php");
?>
<html><!-- InstanceBegin template="/Templates/temp02.dwt.php" codeOutsideHTMLIsLocked="false" -->
<style type="text/css">
<!--
#subcontent {
	position:absolute;
	left:243px;
	top:0px;
	width:706px;
	height:59px;
	z-index:1;
	background-color: #70a972;
}
#subcontent01 {
	position:absolute;
	left:22px;
	top:11px;
	width:287px;
	height:39px;
	font:Tahoma;
	font-size:30px;
	font-weight:600px;
	color:#E8E8E8;
	z-index:1;
}
#subcontent02 {
	position:absolute;
	left:312px;
	top:29px;
	font:Tahoma;
	font-size:18px;
	font-weight:500px;
	color:#E8E8E8;
	width:199px;
	height:25px;
	z-index:2;
}
-->
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="css/product.css" />

<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>
<?php 
function GetQuantity($id){
		$cart = $_SESSION["CART"];
		$quantity=0;
		foreach(array_keys($cart) as $value){
			if($value == $id){
				$quantity = $cart[$id];
				break;
			}
		}
		return $quantity;	
	} 
?>
<div id="wrap">
	<div id="title">
		<div id="title01">
			<span><a href="register.php">Register </a>|<a href="mycart.php"> My Cart </a>|<a href="login.php"> Login </a></span>
		</div>
	</div>
	<div id="header">
		<div id="searchform">
	    	<form action="Templates/search.php">
					<input type="text" name="s" value="" onKeyPress="this.style.backgroundColor='pink'" onBlur="this.style.backgroundColor='white'" onFocus="this.style.backgroundColor='pink'"/>
			</form>
		</div>
	</div>
	<div id="menu">
		<ul>
			<li><a href="index.php">TRANG CHỦ</a></li>
			<li><a href="introduce.php">GIỚI THIỆU</a></li>
			<li><a href="product_view.php">SẢN PHẨM</a></li>
			<li><a href="promotion.php">KHUYẾN MẠI</a></li>			
			<li><a href="tuvan.php">TƯ VẤN THIẾT BỊ</a></li>
			<li><a href="phanhoi.php">PHẢN HỒI</a></li>
		</ul>
   </div>
   <div id="submenu">
   		<div id="submennu01"><a href="#">Uy tín/Chất lượng</a></div>
  </div>
   <div id="center">
   		<div id="left">
			<div id="danhmuc"><a href="product_view.php?catid=0">DANH MỤC SẢN PHẨM</a></div>
			<div id="left01">
			<?php 
						$sql=mysql_query("select * from catagory");
						while($row=mysql_fetch_array($sql))
					{
					    echo "<font color=#F8F8F8>::</font>";
						echo "<a href='product_view.php?catid={$row["catID"]}'>{$row["catName"]}</a><br>";
						echo "<font color=#666633 >-------------------------------</font><br>";
					}
			?>
			</div>
			<div id="giohang">
				<div id="giohang01"><b style="font:Tahoma; font-size:14px; color:#FFFFFF;">GIỎ HÀNG CỦA BẠN</b></div>
			</div>
			<div id="cart">
			  <?php include("cartdetail.php");?></div>
		</div>
		<div id="subcontent">
			<div id="subcontent01">NỘI THẤT CAO CẤP</div>
			<div id="subcontent02">UY TÍN - CHẤT LƯỢNG</div>
		</div>
		<div id="content"><!-- InstanceBeginEditable name="vungsuaduoc" -->
		<?php 
 		require("connect.php");
		$uname = $_SESSION["username"];
		$result=mysql_query("select * from user where uname='{$uname}'") or die("Khong co du lieu");
		if(mysql_num_rows($result)==0){
			echo "Khong co du lieu";
		}

			while($row=mysql_fetch_array($result)){
?>
<center>
	<form action="user_edit.php" enctype="multipart/form-data">
<table width="60%" border="1" bordercolor="#70a972" id="styleTable" cellspacing="0px">
	<tr><td colspan="2" align="center"> THÔNG TIN THÀNH VIÊN </td></tr>
	<tr height="40">
		<td  >Tên đăng nhập </td>
        <td align="center"><?php echo $row["uname"]; ?></td>
	</tr>
		<tr height="40">
		<td  >Quyền </td>
		<td align="center"><?php echo $row["gid"]; ?></td>
	</tr>
		<tr height="40">
		<td  >Giới tính </td>
		<td align="center"><?php echo $row ["gender"];?></td>
	</tr>
		<tr height="40">
		<td  >Tuổi </td>
		<td align="center"><?php echo $row ["age"];?></td>
	</tr>
		<tr height="40">
		<td  >Địa chỉ </td>
		<td align="center"><?php echo $row ["address"];?></td>
	</tr>
		<tr height="40">
		<td  >Email </td>
		<td align="center"><?php echo $row ["email"];?></td>
	</tr>
		<tr height="40">
		<td  >Số điện thoại </td>
		<td align="center"><?php echo $row ["phone"];?></td>
	</tr>
		<tr height="40">
		<td  >Trạng thái</td>
		<td align="center"><?php echo $row ["status"];?></td>
	</tr>
		<tr height="40">
		<td  >Họ tên </td>
		<td align="center"><?php echo $row ["fullname"];?></td>
	</tr>
		<tr height="40">
		<td colspan="2" align="center" ><input name="submit" type="submit" value="Sửa thông tin"></td>
	</tr>

</table>
   </form>
<center>
	  <?php
	  	}
	  ?>
		
		<!-- InstanceEndEditable --></div>
   </div>
   <div id="footer01">
  		<center><a href="#">Design By H3TL&nbsp;Group3<br> Mọi thông tin chi tiết xin liên hệ: h3tl.itpro@gmail.com</a></center>
  </div>
   
</div>


</body>
<!-- InstanceEnd --></html>
